﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Lrd.Template.Core.CodeGenerator
{
  public  interface ICodeGenerator
    {
        /// <summary>
        /// 生成项目文件
        /// </summary>
        /// <param name="project">项目元数据</param>
        /// <returns>项目代码</returns>
        CodeFile[] GenerateProjectCode(ProjectMetadata projectMetadata,  string[] ceneratorTableNames);

        CodeFile GenerateEntityCode(DbTable table);

        CodeFile GenerateEntityConfigurationCode(DbTable table);

        void  WriteAndSave(string filePath, CodeFile codeFile, bool isCoveredExsited = true);
    }
}
